//
//  ILRNIManager.h
//  CMKit_Example
//
//  Created by OrrHsiao on 2022/3/28.
//  Copyright © 2022 zrf. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ILRNIDeviceModel.h"
#if defined(__has_include) && __has_include(<IMILabSDK_Link/ILBindDeviceModel.h>)
#import <IMILabSDK_Link/ILBindDeviceModel.h>
#else
#import "ILBindDeviceModel.h"
#endif

//跳转的通知
static NSString * const ILRNIGotoNotification = @"ILRNIGotoNotification";

typedef NS_ENUM(NSInteger, ILRNIManagerJumpType) {
    /// 进入下个页面
    ILRNIManagerJumpTypePush = 1,
    /// 返回上个页面
    ILRNIManagerJumpTypePop = 2,
};

typedef NS_ENUM(NSInteger, ILRNIManagerVCType) {
    /// 默认或者说无
    ILRNIManagerVCTypeDefault = 0,
    /// 摄像机通用设置
    ILRNIManagerVCTypeCameraGeneralSetting,
    /// 009摄像机
    ILRNIManagerVCType009CameraVC,
    /// SD卡信息
    ILRNIManagerVCTypeCameraSDInfoVC,
    /// 存储设置
    ILRNIManagerVCTypeStorageSetting,
    /// 云存购买
    ILRNIManagerVCTypeCloudStorgeBuy,
    /// 系统WIFI设置
    ILRNIManagerVCTypeWIFISetting,
    /// 相册
    ILRNIManagerVCTypeAlbum,
    /// 云存事件
    ILRNIManagerVCTypeMoveDetection,
    /// 定时休眠
    ILRNIManagerVCTypeSleepTimer,
    /// ota
    ILRNIManagerVCTypeOta,
    /// 扫描二维码
    ILRNIManagerVCTypeQRScanCode,
    /// 阿里插件
    ILRNIManagerVCTypeDeviceAliPlugin,
    /// 配置设备的WIFI信息
    ILRNIManagerVCTypeConfigWifi,
    /// 绑定结果
    ILRNIManagerVCTypeBindResult,
    /// RN页面
    ILRNIManagerVCTypeRnDevicePage,
    /// 原生页面
    ILRNIManagerVCTypeNativePage,
    /// 原生设备页面
    ILRNIManagerVCTypeNativeDevPage,
};

typedef void(^ILRNIManagerRouterBlock)(ILRNIManagerJumpType jumpType, ILRNIManagerVCType vcType, NSDictionary * _Nullable infoDic);
///
///@params eventType 参考  ILEventType
typedef void(^ILRNIManagerReporterBlock)(NSInteger eventType,NSString * _Nonnull key, NSDictionary * _Nullable infoDic);


NS_ASSUME_NONNULL_BEGIN

@interface ILRNIManager : NSObject

/// 语言
@property (nonatomic, copy)NSString *language;

/// 服务器 默认值-1 cn:0 sg:1 us:3 eu:4
@property (nonatomic, copy)NSString *serverCode;

/// 服务器根请求地址
@property (nonatomic, copy)NSString *serverBaseUrl;
/// Capability app相关信息 RN页面赋值
@property (nonatomic, copy)NSDictionary *Capability;

@property (nonatomic, assign, readonly) NSInteger sdkVersion;

/// 用户相关信息 RN页面赋值
@property (nonatomic, copy)NSDictionary *userInfo;

/// 当前RN插件的设备模型相关信息
@property (nonatomic, strong)ILRNIDeviceModel *deviceModel;

//创建"家"模式
@property(nonatomic, assign)ILDeviceBindHomeConfig homeConfig;

/// VC跳转回调
@property (nonatomic , copy)ILRNIManagerRouterBlock routerBlock;

/// 打点回调
@property(nonatomic , copy)ILRNIManagerReporterBlock reporterBlock;

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;
- (id)copy NS_UNAVAILABLE;
- (id)mutableCopy NS_UNAVAILABLE;

/// 获取实例
+ (instancetype)sharedManager;

/// 以默认配置初始化
- (void)initDefaultConfig;

- (NSString *)getPhotoLibName;

@end

NS_ASSUME_NONNULL_END
